import request from '@/utils/request'

export default {
    /**根据课程id查询章节和小结标题
     * 
     * @param {*} id 
     * @returns 
     */
    get_chapter_video_title_list(id) {
        return request({
            url: `/eduService/chapter/getChapterList/${id}`,
            method: 'get'
        })
    },

    /**添加章节
     * 
     * @param {*} chapter 
     * @returns 
     */
    add_chapter(chapter){
        return request({
            url:`/eduService/chapter/addChapter`,
            method:'post',
            data:chapter
        })
    },

    /**修改课程章节
     * 
     * @param {*} chapter 
     * @returns 
     */
    update_chapter(chapter){
        return request({
            url:`/eduService/chapter/updateChapter`,
            method:'post',
            data:chapter
        })
    },
    /**id查询课程章节
     * 
     * @param {*} id 
     * @returns 
     */
    get_chapter(id){
        return request({
            url:`/eduService/chapter/getChapter/${id}`,
            method:'post',
        })
    },
    /**id删除课程章节
     * 
     * @param {*} id 
     * @returns 
     */
    delete_chapter(id){
        return request({
            url:`/eduService/chapter/deleteChapter/${id}`,
            method:'DELETE'
        })
    }

}